home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs-faq.info-4.z / xemacs-faq.info-4
Encoding:
GNU Info File  |  1998-05-21  |  47.6 KB  |  1,298 lines

  1. This is Info file ../info/xemacs-faq.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs-faq.texi.
  3.  
  4. 
  5. File: xemacs-faq.info,  Node: Q4.0.8,  Next: Q4.0.9,  Prev: Q4.0.7,  Up: Subsystems
  6.  
  7. Remote Mailreading with VM.
  8. ===========================
  9.  
  10.    My mailbox lives at the office on a big honkin server.  My regular
  11. INBOX lives on my honkin desktop machine.  I now can PPP to the office
  12. from home which is far from honking...  I'd like to be able to read
  13. mail at home without storing it here and I'd like to use xemacs and VM
  14. at home...  Is there a recommended setup?
  15.  
  16.    Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> writes:
  17.  
  18.      There are several ways to do this.
  19.  
  20.        1. Set your display to your home machine and run dxpc or one of
  21.           the other X compressors.
  22.  
  23.        2. NFS mount your desktop machine on your home machine and
  24.           modify your pop command on your home machine to rsh to your
  25.           desktop machine and actually do the pop get's.
  26.  
  27.        3. Run a POP server on your desktop machine as well and do a
  28.           sort of two tiered POP get.
  29.  
  30.    William Perry <wmperry@monolith.spry.com> adds:
  31.  
  32.      Or you could run a pop script periodically on your desktop
  33.      machine, and just use ange-ftp or NFS to get to your mailbox.  I
  34.      used to do this all the time back at IU.
  35.  
  36. 
  37. File: xemacs-faq.info,  Node: Q4.0.9,  Next: Q4.0.10,  Prev: Q4.0.8,  Up: Subsystems
  38.  
  39. rmail or VM gets an error incorporating new mail.
  40. =================================================
  41.  
  42.    Quoting the XEmacs PROBLEMS file:
  43.  
  44.      rmail and VM get new mail from `/usr/spool/mail/$USER' using a
  45.      program called `movemail'.  This program interlocks with
  46.      `/bin/mail' using the protocol defined by `/bin/mail'.
  47.  
  48.      There are two different protocols in general use.  One of them
  49.      uses the `flock' system call.  The other involves creating a lock
  50.      file; `movemail' must be able to write in `/usr/spool/mail' in
  51.      order to do this.  You control which one is used by defining, or
  52.      not defining, the macro `MAIL_USE_FLOCK' in `config.h' or the m-
  53.      or s- file it includes.
  54.  
  55.      *IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
  56.      SYSTEM, YOU CAN LOSE MAIL!*
  57.  
  58.      If your system uses the lock file protocol, and fascist
  59.      restrictions prevent ordinary users from writing the lock files in
  60.      `/usr/spool/mail', you may need to make `movemail' setgid to a
  61.      suitable group such as `mail'.  You can use these commands (as
  62.      root):
  63.  
  64.           chgrp mail movemail
  65.           chmod 2755 movemail
  66.  
  67.      If your system uses the lock file protocol, and fascist
  68.      restrictions prevent ordinary users from writing the lock files in
  69.      `/usr/spool/mail', you may need to make `movemail' setgid to a
  70.      suitable group such as `mail'.  To do this, use the following
  71.      commands (as root) after doing the make install.
  72.  
  73.           chgrp mail movemail
  74.           chmod 2755 movemail
  75.  
  76.      Installation normally copies movemail from the build directory to
  77.      an installation directory which is usually under `/usr/local/lib'.
  78.      The installed copy of `movemail' is usually in the directory
  79.      `/usr/local/lib/emacs/VERSION/TARGET'.  You must change the group
  80.      and mode of the installed copy; changing the group and mode of the
  81.      build directory copy is ineffective.
  82.  
  83. 
  84. File: xemacs-faq.info,  Node: Q4.0.10,  Next: Q4.0.11,  Prev: Q4.0.9,  Up: Subsystems
  85.  
  86. How do I make VM stay in a single frame?
  87. ========================================
  88.  
  89.    John S Cooper <John.Cooper@Eng.Sun.COM> writes:
  90.  
  91.           ; Don't use multiple frames
  92.           (setq vm-frame-per-composition nil)
  93.           (setq vm-frame-per-folder nil)
  94.           (setq vm-frame-per-edit nil)
  95.           (setq vm-frame-per-summary nil)
  96.  
  97. 
  98. File: xemacs-faq.info,  Node: Q4.0.11,  Next: Q4.0.12,  Prev: Q4.0.10,  Up: Subsystems
  99.  
  100. How do I make VM or mh-e display graphical smilies?
  101. ===================================================
  102.  
  103.    For mh-e use the following:
  104.  
  105.      (add-hook 'mh-show-mode-hook '(lambda () (smiley-region (point-min)
  106.                                                              (point-max))))
  107.  
  108.    For vm use the following:
  109.      (require 'messagexmas)
  110.      (require 'smiley)
  111.      (add-hook 'vm-select-message-hook '(lambda () (smiley-region (point-min)
  112.                                                                   (point-max))))
  113.  
  114.    For tm use the following:
  115.      (autoload 'smiley-buffer "smiley" nil t)
  116.      (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
  117.  
  118. 
  119. File: xemacs-faq.info,  Node: Q4.0.12,  Next: Q4.1.1,  Prev: Q4.0.11,  Up: Subsystems
  120.  
  121. Customization of VM not covered in the manual, or here.
  122. =======================================================
  123.  
  124.    giacomo boffi <boffi@hp735.stru.polimi.it> writes:
  125.  
  126.      The meta-answer is to look into the file `vm-vars.el', in the vm
  127.      directory of the lisp library.
  128.  
  129.      `vm-vars.el' contains, initializes and carefully describes, with
  130.      examples of usage, the plethora of user options that *fully*
  131.      control VM's behavior.
  132.  
  133.      Enter vm-vars, `forward-search' for toolbar, find the variables
  134.      that control the toolbar placement, appearance, existence, copy to
  135.      your `.emacs' or `.vm' and modify according to the detailed
  136.      instructions.
  137.  
  138.      The above also applies to all the various features of VM: search
  139.      for some keywords, maybe the first you conjure isn't appropriate,
  140.      find the appropriate variables, copy and experiment.
  141.  
  142. 
  143. File: xemacs-faq.info,  Node: Q4.1.1,  Next: Q4.1.2,  Prev: Q4.0.12,  Up: Subsystems
  144.  
  145. What is W3?
  146. ===========
  147.  
  148.    W3 is an advanced graphical browser written in Emacs lisp that runs
  149. on XEmacs.  It has full support for cascaded style sheets, and more...
  150.  
  151.    It has a home web page at
  152. <URL:http://www.cs.indiana.edu/elisp/w3/docs.html>.
  153.  
  154. 
  155. File: xemacs-faq.info,  Node: Q4.1.2,  Next: Q4.1.3,  Prev: Q4.1.1,  Up: Subsystems
  156.  
  157. How do I run W3 from behind a firewall?
  158. =======================================
  159.  
  160.    There is a long, well-written, detailed section in the W3 manual that
  161. describes how to do this.  Look in the section entitled "Firewalls".
  162.  
  163. 
  164. File: xemacs-faq.info,  Node: Q4.1.3,  Next: Q4.2.1,  Prev: Q4.1.2,  Up: Subsystems
  165.  
  166. Is it true that W3 supports style sheets and tables?
  167. ====================================================
  168.  
  169.    Yes, and much more.  W3, as distributed with the latest XEmacs is a
  170. full-featured web browser.
  171.  
  172. 
  173. File: xemacs-faq.info,  Node: Q4.2.1,  Next: Q4.2.2,  Prev: Q4.1.3,  Up: Subsystems
  174.  
  175. GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
  176. ========================================================================
  177.  
  178.    The Gnus numbering issues are not meant for mere mortals to know
  179. them.  If you feel you *must* enter the muddy waters of Gnus, visit the
  180. excellent FAQ, maintained by Justin Sheehy, at:
  181.  
  182.      <URL:http://www.ccs.neu.edu/software/gnus/>
  183.  
  184.    See also Gnus home page
  185.      <URL:http://www.gnus.org/>
  186.  
  187. 
  188. File: xemacs-faq.info,  Node: Q4.2.2,  Next: Q4.2.3,  Prev: Q4.2.1,  Up: Subsystems
  189.  
  190. This question intentionally left blank.
  191. =======================================
  192.  
  193.    Obsolete question, left blank to avoid renumbering.
  194.  
  195. 
  196. File: xemacs-faq.info,  Node: Q4.2.3,  Next: Q4.2.4,  Prev: Q4.2.2,  Up: Subsystems
  197.  
  198. How do I make Gnus stay within a single frame?
  199. ==============================================
  200.  
  201.    The toolbar code to start Gnus opens the new frame--and it's a
  202. feature rather than a bug.  If you don't like it, but would still like
  203. to click on the seemly icon, use the following code:
  204.  
  205.      (defun toolbar-news ()
  206.        (gnus))
  207.  
  208.    It will redefine the callback function of the icon to just call
  209. `gnus', without all the fancy frame stuff.
  210.  
  211. 
  212. File: xemacs-faq.info,  Node: Q4.2.4,  Next: Q4.3.1,  Prev: Q4.2.3,  Up: Subsystems
  213.  
  214. How do I customize the From: line?
  215. ==================================
  216.  
  217.    How do I change the `From:' line?  I have set gnus-user-from-line to
  218. Gail Gurman <gail.gurman@sybase.com>, but XEmacs Gnus doesn't use it.
  219. Instead it uses Gail Mara Gurman <gailg@deall> and then complains that
  220. it's incorrect. Also, as you perhaps can see, my Message-ID is screwy.
  221. How can I change that?
  222.  
  223.    Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> writes:
  224.  
  225.      Set `user-mail-address' to `gail.gurman@sybase.com' or
  226.      `mail-host-address' to `sybase.com'.
  227.  
  228. 
  229. File: xemacs-faq.info,  Node: Q4.3.1,  Next: Q4.3.2,  Prev: Q4.2.4,  Up: Subsystems
  230.  
  231. How can I read and/or compose MIME messages?
  232. ============================================
  233.  
  234.    One answer is `tra-vm-mime'.  You may find it at
  235. <URL:http://lenkkari.cs.tut.fi/~tra/software/tra-vm-mime.el>.
  236.  
  237.    Another possibility is RMIME.  You may find RMIME at
  238. <URL:http://www.cinti.net/~rmoody/rmime/index.html>.
  239.  
  240.    You probably want to use the Tools for MIME (tm).  *Note Q4.3.2:: for
  241. details.
  242.  
  243.    Trey Jackson <trey@cs.berkeley.edu> has an Emacs & MIME web page at
  244. <URL:http://bmrc.berkeley.edu/~trey/emacs/mime.html>.
  245.  
  246. 
  247. File: xemacs-faq.info,  Node: Q4.3.2,  Next: Q4.3.3,  Prev: Q4.3.1,  Up: Subsystems
  248.  
  249. What is TM and where do I get it?
  250. =================================
  251.  
  252.    TM stands for "Tools for MIME" and not Tiny MIME.  TM integrates
  253. with all major XEmacs packages like Gnus (all flavors), VM, MH-E, and
  254. mailcrypt.  It provides totally transparent and trouble-free MIME
  255. support.  When appropriate a message will be decoded in place in an
  256. XEmacs buffer.
  257.  
  258.    TM now comes as a package with XEmacs 19.16 and XEmacs 20.2.
  259.  
  260.    TM was written by MORIOKA Tomohiko <morioka@jaist.ac.jp> and
  261. KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>.  It is based on the work of
  262. UMEDA Masanobu <umerin@mse.kyutech.ac.jp>, the original writer of GNUS.
  263.  
  264.    The following information is from the `README':
  265.  
  266.    "tm" is a MIME package for GNU Emacs.  tm has following functions:
  267.  
  268.    * MIME style multilingual header.
  269.  
  270.    * MIME message viewer (mime/viewer-mode).
  271.  
  272.    * MIME message composer (mime/editor-mode).
  273.  
  274.    * MIME extenders for mh-e, GNUS, RMAIL and VM.
  275.  
  276.    tm is available from following anonymous ftp sites:
  277.    * <URL:ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/> (Japan).
  278.  
  279.    * <URL:ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/> (Japan).
  280.  
  281.    * <URL:ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/> (US).
  282.  
  283.    * <URL:ftp://ftp.miranova.com/pub/gnus/jaist.ac.jp/> (US).
  284.  
  285.    * <URL:ftp://ftp.unicamp.br/pub/mail/mime/tm/> (Brasil).
  286.  
  287.    * <URL:ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/>
  288.      (Germany).
  289.  
  290.    * <URL:ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/>
  291.      (Germany).
  292.  
  293.    Don't let the installation procedure & instructions stop you from
  294. trying this package out--it's much simpler than it looks, and once
  295. installed, trivial to use.
  296.  
  297. 
  298. File: xemacs-faq.info,  Node: Q4.3.3,  Next: Q4.3.4,  Prev: Q4.3.2,  Up: Subsystems
  299.  
  300. Why isn't this `movemail' program working?
  301. ==========================================
  302.  
  303.    Ben Wing <ben@666.com> writes:
  304.  
  305.      It wasn't chown'ed/chmod'd correctly.
  306.  
  307. 
  308. File: xemacs-faq.info,  Node: Q4.3.4,  Next: Q4.3.5,  Prev: Q4.3.3,  Up: Subsystems
  309.  
  310. Movemail is also distributed by Netscape?  Can that cause problems?
  311. ===================================================================
  312.  
  313.    Steve Baur <steve@altair.xemacs.org> writes:
  314.  
  315.      Yes.  Always use the movemail installed with your XEmacs.  Failure
  316.      to do so can result in lost mail.
  317.  
  318.    Please refer to Jamie Zawinski's <jwz@netscape.com> notes at
  319. <URL:http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/movemail.html>.
  320. In particular, this document will show you how to make Netscape use the
  321. version of movemail configured for your system by the person who built
  322. XEmacs.
  323.  
  324. 
  325. File: xemacs-faq.info,  Node: Q4.3.5,  Next: Q4.4.1,  Prev: Q4.3.4,  Up: Subsystems
  326.  
  327. Where do I find pstogif (required by tm)?
  328. =========================================
  329.  
  330.    pstogif is part of the latex2html package.
  331.  
  332.    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
  333.  
  334.    latex2html is best found at the CTAN hosts and their mirrors in
  335. `tex-archive/support/latex2html'.
  336.  
  337.    CTAN hosts are:
  338.  
  339.    * <URL:ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/>.
  340.  
  341.    * <URL:ftp://ftp.dante.de/tex-archive/support/latex2html/>.
  342.  
  343.    There is a good mirror at ftp.cdrom.com;
  344. <URL:ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/>.
  345.  
  346. 
  347. File: xemacs-faq.info,  Node: Q4.4.1,  Next: Q4.5.1,  Prev: Q4.3.5,  Up: Subsystems
  348.  
  349. What is SPARCworks, EOS, and WorkShop?
  350. ======================================
  351.  
  352.    John Turner <turner@lanl.gov> writes:
  353.  
  354.      SPARCworks is SunSoft's development environment, comprising
  355.      compilers (C, C++, FORTRAN 77, Fortran 90, Ada, and Pascal), a
  356.      debugger, and other tools such as TeamWare (for configuration
  357.      management), MakeTool, etc.
  358.  
  359.    See <URL:http://www.sun.com/sunsoft/Developer-products/> for more
  360. info.
  361.  
  362.    EOS stands for "Era on SPARCworks", but I don't know what Era stands
  363. for.
  364.  
  365.    EOS is the integration of XEmacs with the SPARCworks debugger.  It
  366. allows one to use an XEmacs frame to view code (complete with
  367. fontification, etc.), set breakpoints, print variables, etc., while
  368. using the SPARCworks debugger.  It works very well and I use it all the
  369. time.
  370.  
  371.    Chuck Thompson <cthomp@xemacs.org> writes:
  372.  
  373.      Era stood for "Emacs Rewritten Again".  It was what we were
  374.      calling the modified version of Lucid Emacs for Sun when I was
  375.      dragged, er, allowed to work on this wonderful editor.
  376.  
  377.    Martin Buchholz <Martin.Buchholz@sun.com> writes:
  378.  
  379.      EOS is being replaced with a new graphical development environment
  380.      called Sun WorkShop, which is currently (07/96) in Alpha Test.
  381.      For more details, check out
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.      <URL:http://www.sun.com/sunsoft/Products/Developer-products/programs.html>.
  391.  
  392. 
  393. File: xemacs-faq.info,  Node: Q4.5.1,  Next: Q4.6.1,  Prev: Q4.4.1,  Up: Subsystems
  394.  
  395. What is/was Energize?
  396. =====================
  397.  
  398.    David N Gray <gray@meteor.harlequin.com> writes:
  399.      The files in `lisp/energize' are to enable Emacs to interface with
  400.      the "Energize Programming System", a C and C++ development
  401.      environment, which was a product of Lucid, Inc.  Tragically, Lucid
  402.      went out of business in 1994, so although Energize is still a
  403.      great system, if you don't already have it, there isn't any way to
  404.      get it now.  (Unless you happen to be in Japan; INS Engineering
  405.      may still be selling it there.  Tartan bought the rights to sell
  406.      it in the rest of the world, but never did so.)
  407.  
  408. 
  409. File: xemacs-faq.info,  Node: Q4.6.1,  Next: Q4.7.1,  Prev: Q4.5.1,  Up: Subsystems
  410.  
  411. What is Infodock?
  412. =================
  413.  
  414.    InfoDock is an integrated productivity toolset, mainly aimed at
  415. technical people.  It is developed and supported by InfoDock
  416. Associates, a firm that offers custom support and development for
  417. InfoDock, XEmacs and GNU Emacs.  (http://www.infodock.com,
  418. <info@infodock.com>, +1 408 243 3300).
  419.  
  420.    InfoDock is built atop the XEmacs variant of GNU Emacs and so has
  421. all of the power of Emacs, but with an easier to use and more
  422. comprehensive menu-based user interface.  The bottom portion of this
  423. text describes how it differs from XEmacs and GNU Emacs from the Free
  424. Software Foundation.
  425.  
  426.    InfoDock is aimed at people who want a free, turn-key productivity
  427. environment.  Although InfoDock is customizable, it is not intended for
  428. people who like basic versions of Emacs which need to be customized
  429. extensively for local use; standard Emacs distributions are better for
  430. such uses.  InfoDock is for those people who want a complete,
  431. pre-customized environment in one package, which they need not touch
  432. more than once or twice a year to update to new revisions.
  433.  
  434.    InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX,
  435. and Intel Linux systems.  It is intended for use on a color display,
  436. although most features will work on monochrome monitors.  Simply unpack
  437. InfoDock according to the instructions in the ID-INSTALL file and you
  438. are ready to run.
  439.  
  440.    The InfoDock Manual is concise, yet sufficient as a user guide for
  441. users who have never used an Emacs-type editor before.  For users who
  442. are already familiar with Emacs, it supplements the information in the
  443. GNU Emacs Manual.
  444.  
  445.    InfoDock menus are much more extensive and more mature than standard
  446. Emacs menus.  Each menu offers a `Manual' item which displays
  447. documentation associated with the menu's functions.
  448.  
  449. Four types of menubars are provided:
  450.   1. An extensive menubar providing access to global InfoDock commands.
  451.  
  452.   2. Mode-specific menubars tailored to the current major mode.
  453.  
  454.   3. A simple menubar for basic editing to help novices get started
  455.      with InfoDock.
  456.  
  457.   4. The standard XEmacs menubar.
  458.  
  459.    Most modes also include mode-specific popup menus.  Additionally,
  460. region and rectangle popup menus are included.
  461.  
  462.    `Hyperbole', the everyday information manager, is a core part of
  463. InfoDock.  This provides context-sensitive mouse keys, a rolodex-type
  464. contact manager, programmable hypertext buttons, and an autonumbered
  465. outliner with embedded hyperlink anchors.
  466.  
  467.    The `OO-Browser', a multi-language object-oriented code browser, is a
  468. standard part of InfoDock.
  469.  
  470.    InfoDock saves a more extensive set of user options than other Emacs
  471. versions.
  472.  
  473.    InfoDock inserts a useful file header in many file types, showing the
  474. author, summary, and last modification time of each file.  A summary
  475. program can then be used to summarize all of the files in a directory,
  476. for easy MANIFEST file creation.
  477.  
  478.    Your working set of buffers is automatically saved and restored (if
  479. you answer yes to a prompt) between InfoDock sessions.
  480.  
  481.    Refined color choices for code highlighting are provided for both
  482. dark and light background display frames.
  483.  
  484.    The `C-z' key prefix performs frame-based commands which parallel the
  485. `C-x' key prefix for window-based commands.
  486.  
  487.    The Smart Menu system is included for producing command menus on dumb
  488. terminals.
  489.  
  490.    Lisp libraries are better categorized according to function.
  491.  
  492.    Extensions and improvements to many areas of Emacs are included,
  493. such as: paragraph filling, mail reading with Rmail, shell handling,
  494. outlining, code highlighting and browsing, and man page browsing.
  495.  
  496.    InfoDock questions, answers and discussion should go to the mail list
  497. `infodock@infodock.com'.  Use `infodock-request@infodock.com' to be
  498. added or removed from the list.  Always include your InfoDock version
  499. number when sending help requests.
  500.  
  501.    InfoDock is available across the Internet via anonymous FTP.  To get
  502. it, first move to a directory into which you want the InfoDock archive
  503. files placed.  We will call this <DIST-DIR>.
  504.  
  505.         cd <DIST-DIR>
  506.  
  507.    Ftp to ftp.xemacs.org  (Internet Host ID = 128.174.252.16):
  508.  
  509.         prompt> ftp ftp.xemacs.org
  510.  
  511.    Login as `anonymous' with your own <user-id>@<site-name> as a
  512. password.
  513.  
  514.         Name (ftp.xemacs.org): anonymous
  515.         331 Guest login ok, send your complete e-mail address as password.
  516.         Password: -<your-user-id@your-domain>
  517.         230 Guest login ok, access restrictions apply.
  518.  
  519.    Move to the location of the InfoDock archives:
  520.  
  521.         ftp> cd pub/infodock
  522.  
  523.    Set your transfer mode to binary:
  524.  
  525.         ftp> bin
  526.         200 Type set to I.
  527.  
  528.    Turn off prompting:
  529.  
  530.         ftp> prompt
  531.         Interactive mode off.
  532.  
  533.    Retrieve the InfoDock archives that you want, either by using a `get
  534. <file>' for each file you want or by using the following to get a
  535. complete distribution, including all binaries:
  536.  
  537.         ftp> mget ID-INSTALL
  538.         ftp> mget id-*
  539.  
  540.    Close the FTP connection:
  541.  
  542.         ftp> quit
  543.         221 Goodbye.
  544.  
  545.    Read the `ID-INSTALL' file which you just retrieved for step-by-step
  546. installation instructions.
  547.  
  548. 
  549. File: xemacs-faq.info,  Node: Q4.7.1,  Next: Q4.7.2,  Prev: Q4.6.1,  Up: Subsystems
  550.  
  551. What is AUC TeX?  Where do you get it?
  552. ======================================
  553.  
  554.    AUC TeX is a package written by Per Abrahamsen <abraham@dina.kvl.dk>.
  555. Starting with XEmacs 19.16, AUC TeX is bundled with XEmacs.  The
  556. following information is from the `README' and website.
  557.  
  558.    AUC TeX is an extensible package that supports writing and formatting
  559. TeX files for most variants of GNU Emacs. Many different macro packages
  560. are supported, including AMS TeX, LaTeX, and TeXinfo.
  561.  
  562.    The most recent version is always available by ftp at
  563. <URL:ftp://sunsite.auc.dk/packages/auctex/auctex.tar.gz>.
  564.  
  565.    In case you don't have access to anonymous ftp, you can get it by an
  566. email request to <URL:mailto:ftpmail@decwrl.dec.com>.
  567.  
  568.    WWW users may want to check out the AUC TeX page at
  569. <URL:http://sunsite.auc.dk/auctex/>.
  570.  
  571. 
  572. File: xemacs-faq.info,  Node: Q4.7.2,  Next: Q4.7.3,  Prev: Q4.7.1,  Up: Subsystems
  573.  
  574. Are there any Emacs Lisp Spreadsheets?
  575. ======================================
  576.  
  577.    Yes.  Check out "dismal" (which stands for Dis' Mode Ain't Lotus) at
  578. <URL:ftp://cs.nyu.edu/pub/local/fox/dismal/>.
  579.  
  580. 
  581. File: xemacs-faq.info,  Node: Q4.7.3,  Next: Q4.7.4,  Prev: Q4.7.2,  Up: Subsystems
  582.  
  583. Byte compiling AUC TeX on XEmacs 19.14.
  584. =======================================
  585.  
  586.    Georges Brun-Cottan <bruncott@dormeur.inria.fr> writes:
  587.  
  588.      When byte compiling auxtex-9.4g, you must use the command:
  589.  
  590.           xemacs -batch -l lpath.el
  591.  
  592. 
  593. File: xemacs-faq.info,  Node: Q4.7.4,  Next: Q4.7.5,  Prev: Q4.7.3,  Up: Subsystems
  594.  
  595. Problems installing AUC TeX.
  596. ============================
  597.  
  598.    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
  599.  
  600.      AUC TeX works fine on both stock Emacs and XEmacs has been doing
  601.      so for a very very long time. This is mostly due to the work of
  602.      Per Abrahamsen <abraham@dina.kvl.dk> (clap clap) in particular his
  603.      `easymenu' package.  Which leads to what is probably the problem...
  604.  
  605.    Most problems with AUC TeX are one of two things:
  606.  
  607.    * The TeX-lisp-directory in `tex-site.el' and the makefile don't
  608.      match.
  609.  
  610.      Fix: make sure you configure AUC TeX properly *before* installing.
  611.  
  612.    * You have an old version of easymenu.el in your path.
  613.  
  614.      Fix: use `locate-library' and remove old versions to make sure it
  615.      *only* finds the one that came with XEmacs.
  616.  
  617. 
  618. File: xemacs-faq.info,  Node: Q4.7.5,  Prev: Q4.7.4,  Up: Subsystems
  619.  
  620. Is there a reason for an Emacs package not to be included in XEmacs?
  621. ====================================================================
  622.  
  623.    The reason for an Emacs package not to be included in XEmacs is
  624. usually one or more of the following:
  625.  
  626.   1. The package has not been ported to XEmacs.  This will typically
  627.      happen when it uses GNU-Emacs-specific features, which make it
  628.      fail under XEmacs.
  629.  
  630.      Porting a package to XEmacs can range from a trivial amount of
  631.      change to a partial or full rewrite.  Fortunately, the authors of
  632.      modern packages usually choose to support both Emacsen themselves.
  633.  
  634.   2. The package has been decided not to be appropriate for XEmacs.  It
  635.      may have an equivalent or better replacement within XEmacs, in
  636.      which case the developers may choose not to burden themselves with
  637.      supporting an additional package.
  638.  
  639.      Each package bundled with XEmacs means more work for the
  640.      maintainers, whether they want it or not.  If you are ready to
  641.      take over the maintainence responsibilities for the package you
  642.      port, be sure to say so - we will more likely include it.
  643.  
  644.   3. The package simply hasn't been noted by the XEmacs development.  If
  645.      that's the case, the messages like yours are very useful for
  646.      attracting our attention.
  647.  
  648.   4. The package was noted by the developers, but they simply haven't
  649.      yet gotten around to including/porting it.  Wait for the next
  650.      release or, even better, offer your help.  It will be gladly
  651.      accepted and appreciated.
  652.  
  653. 
  654. File: xemacs-faq.info,  Node: Miscellaneous,  Next: Current Events,  Prev: Subsystems,  Up: Top
  655.  
  656. The Miscellaneous Stuff
  657. ***********************
  658.  
  659.    This is part 5 of the XEmacs Frequently Asked Questions list.  This
  660. section is devoted to anything that doesn't fit neatly into the other
  661. sections.
  662.  
  663. * Menu:
  664.  
  665. Major & Minor Modes:
  666. * Q5.0.1::      How can I do source code highlighting using font-lock?
  667. * Q5.0.2::      I do not like cc-mode.  How do I use the old c-mode?
  668. * Q5.0.3::      How do I get `More' Syntax Highlighting on by default?
  669. * Q5.0.4::      How can I enable auto-indent?
  670. * Q5.0.5::      How can I get XEmacs to come up in text/auto-fill mode by default?
  671. * Q5.0.6::      How do I start up a second shell buffer?
  672. * Q5.0.7::      Telnet from shell filters too much.
  673. * Q5.0.8::      Why does edt emulation not work?
  674. * Q5.0.9::      How can I emulate VI and use it as my default mode?
  675. * Q5.0.10::     [This question intentionally left blank]
  676. * Q5.0.11::     Filladapt doesn't work in 19.15?
  677. * Q5.0.12::     How do I disable gnuserv from opening a new frame?
  678. * Q5.0.13::     How do I start gnuserv so that each subsequent XEmacs is a client?
  679. * Q5.0.14::     Strange things are happening in Shell Mode.
  680. * Q5.0.15::     Where do I get the latest CC Mode?
  681. * Q5.0.16::     I find auto-show-mode disconcerting.  How do I turn it off?
  682. * Q5.0.17::     How can I get two instances of info?
  683. * Q5.0.18::     I upgraded to XEmacs 19.14 and gnuserv stopped working
  684. * Q5.0.19::     Is there something better than LaTeX mode?
  685.  
  686. Emacs Lisp Programming Techniques:
  687. * Q5.1.1::      The difference in key sequences between XEmacs and GNU Emacs?
  688. * Q5.1.2::      Can I generate "fake" keyboard events?
  689. * Q5.1.3::      Could you explain `read-kbd-macro' in more detail?
  690. * Q5.1.4::      What is the performance hit of `let'?
  691. * Q5.1.5::      What is the recommended use of `setq'?
  692. * Q5.1.6::      What is the typical misuse of `setq'?
  693. * Q5.1.7::      I like the the `do' form of cl, does it slow things down?
  694. * Q5.1.8::      I like recursion, does it slow things down?
  695. * Q5.1.9::      How do I put a glyph as annotation in a buffer?
  696. * Q5.1.10::     `map-extents' won't traverse all of my extents!
  697.  
  698. Sound:
  699. * Q5.2.1::      How do I turn off the sound?
  700. * Q5.2.2::      How do I get funky sounds instead of a boring beep?
  701. * Q5.2.3::      What's NAS, how do I get it?
  702. * Q5.2.4::      Sunsite sounds don't play.
  703.  
  704. Miscellaneous:
  705. * Q5.3.1::      How do you make XEmacs indent CL if-clauses correctly?
  706. * Q5.3.2::      Fontifying hangs when editing a postscript file.
  707. * Q5.3.3::      How can I print WYSIWYG a font-locked buffer?
  708. * Q5.3.4::      Getting `M-x lpr' to work with postscript printer.
  709. * Q5.3.5::      How do I specify the paths that XEmacs uses for finding files?
  710. * Q5.3.6::      [This question intentionally left blank]
  711. * Q5.3.7::      Can I have the end of the buffer delimited in some way?
  712. * Q5.3.8::      How do I insert today's date into a buffer?
  713. * Q5.3.9::      Are only certain syntactic character classes available for abbrevs?
  714. * Q5.3.10::     How can I get those oh-so-neat X-Face lines?
  715. * Q5.3.11::     How do I add new Info directories?
  716. * Q5.3.12::     What do I need to change to make printing work?
  717.  
  718. 
  719. File: xemacs-faq.info,  Node: Q5.0.1,  Next: Q5.0.2,  Prev: Miscellaneous,  Up: Miscellaneous
  720.  
  721. How can I do source code highlighting using font-lock?
  722. ======================================================
  723.  
  724.    For most modes, font-lock is already set up and just needs to be
  725. turned on.  This can be done by `M-x font-lock-mode', or by having
  726. XEmacs automatically start it by adding lines like:
  727.  
  728.      (add-hook 'emacs-lisp-mode-hook    'turn-on-font-lock)
  729.      (add-hook 'dired-mode-hook    'turn-on-font-lock)
  730.  
  731.    to your `.emacs'.  See the file `etc/sample.emacs' for more examples.
  732.  
  733.    See also `Syntax Highlighting' from the `Options' menu.  Remember to
  734. save options.
  735.  
  736. 
  737. File: xemacs-faq.info,  Node: Q5.0.2,  Next: Q5.0.3,  Prev: Q5.0.1,  Up: Miscellaneous
  738.  
  739. I do not like cc-mode.  How do I use the old c-mode?
  740. ====================================================
  741.  
  742.    Well, first off, consider if you really want to do this.  cc-mode is
  743. much more powerful than the old c-mode.  If you're having trouble
  744. getting your old offsets to work, try using `c-set-offset' instead.
  745. You might also consider using the package `cc-compat'.
  746.  
  747.    But, if you still insist, add the following lines to your `.emacs':
  748.  
  749.      (fmakunbound 'c-mode)
  750.      (makunbound 'c-mode-map)
  751.      (fmakunbound 'c++-mode)
  752.      (makunbound 'c++-mode-map)
  753.      (makunbound 'c-style-alist)
  754.      (load-library "old-c-mode")
  755.      (load-library "old-c++-mode")
  756.  
  757.    This must be done before any other reference is made to either
  758. c-mode or c++-mode.
  759.  
  760. 
  761. File: xemacs-faq.info,  Node: Q5.0.3,  Next: Q5.0.4,  Prev: Q5.0.2,  Up: Miscellaneous
  762.  
  763. How do I get `More' Syntax Highlighting on by default?
  764. ======================================================
  765.  
  766.    Use the following code in your `.emacs':
  767.  
  768.      (setq-default font-lock-maximum-decoration t)
  769.  
  770.    In versions of XEmacs prior to 19.14, you had to use a kludgy
  771. solution like this:
  772.  
  773.      (setq c-font-lock-keywords c-font-lock-keywords-2
  774.            c++-font-lock-keywords c++-font-lock-keywords-2
  775.            lisp-font-lock-keywords lisp-font-lock-keywords-2)
  776.  
  777.    It will work for C, C++ and Lisp.
  778.  
  779.    See also `Syntax Highlighting' from the `Options' menu.  Remember to
  780. save options.
  781.  
  782. 
  783. File: xemacs-faq.info,  Node: Q5.0.4,  Next: Q5.0.5,  Prev: Q5.0.3,  Up: Miscellaneous
  784.  
  785. How can I enable auto-indent?
  786. =============================
  787.  
  788.    Put the following line in your `.emacs':
  789.  
  790.      (setq indent-line-function 'indent-relative-maybe)
  791.  
  792.    If you want to get fancy, try the `filladapt' package available
  793. standard with XEmacs.  Put this into your `.emacs':
  794.  
  795.      (require 'filladapt)
  796.      (add-hook 'text-mode-hook    'turn-on-filladapt-mode)
  797.      ;;; and others ...
  798.  
  799.    You can customize filling and adaptive filling with Customize.
  800. Select from the `Options' menu
  801. `Customize->Emacs->->Editing->Fill->Fill...'  or type `M-x customize
  802. RET fill RET'.
  803.  
  804.    Note that well-behaving text-lookalike modes will run
  805. `text-mode-hook' by default (e.g. that's what Message does).  For the
  806. nasty ones, you'll have to provide the `add-hook's yourself.
  807.  
  808.    Please note that the `fa-extras' package is no longer useful.
  809.  
  810. 
  811. File: xemacs-faq.info,  Node: Q5.0.5,  Next: Q5.0.6,  Prev: Q5.0.4,  Up: Miscellaneous
  812.  
  813. How can I get XEmacs to come up in text/auto-fill mode by default?
  814. ==================================================================
  815.  
  816.    Try the following lisp in your `.emacs':
  817.  
  818.      (setq default-major-mode 'text-mode)
  819.      (setq text-mode-hook 'turn-on-auto-fill)
  820.  
  821.    *WARNING*: note that changing the value of `default-major-mode' from
  822. `fundamental-mode' can break a large amount of built-in code that
  823. expects newly created buffers to be in `fundamental-mode'.  (Changing
  824. from `fundamental-mode' to `text-mode' might not wreak too much havoc,
  825. but changing to something more exotic like a lisp-mode would break many
  826. Emacs packages).
  827.  
  828.    Note that Emacs by default starts up in buffer `*scratch*' in
  829. `initial-major-mode', which defaults to `lisp-interaction-mode'. Thus
  830. adding the following form to your Emacs init file will cause the
  831. initial `*scratch*' buffer to be put into auto-fill'ed `text-mode':
  832.  
  833.      (setq initial-major-mode
  834.            (lambda ()
  835.              (text-mode)
  836.              (turn-on-auto-fill)))
  837.  
  838.    Note that after your init file is loaded, if
  839. `inhibit-startup-message' is `nil' (the default) and the startup buffer
  840. is `*scratch*' then the startup message will be inserted into
  841. `*scratch*'; it will be removed after a timeout by erasing the entire
  842. `*scratch*' buffer.  Keep in mind this default usage of `*scratch*' if
  843. you desire any prior manipulation of `*scratch*' from within your Emacs
  844. init file. In particular, anything you insert into `*scratch*' from
  845. your init file will be later erased. Also, if you change the mode of
  846. the `*scratch*' buffer, be sure that this will not interfere with
  847. possible later insertion of the startup message (e.g. if you put
  848. `*scratch*' into a nonstandard mode that has automatic font lock rules,
  849. then the startup message might get fontified in a strange foreign
  850. manner, e.g. as code in some programming language).
  851.  
  852. 
  853. File: xemacs-faq.info,  Node: Q5.0.6,  Next: Q5.0.7,  Prev: Q5.0.5,  Up: Miscellaneous
  854.  
  855. How do I start up a second shell buffer?
  856. ========================================
  857.  
  858.    In the `*shell*' buffer:
  859.  
  860.      M-x rename-buffer RET *shell-1* RET
  861.      M-x shell RET
  862.  
  863.    This will then start a second shell.  The key is that no buffer named
  864. `*shell*' can exist.  It might be preferable to use `M-x
  865. rename-uniquely' to rename the `*shell*' buffer instead of `M-x
  866. rename-buffer'.
  867.  
  868. 
  869. File: xemacs-faq.info,  Node: Q5.0.7,  Next: Q5.0.8,  Prev: Q5.0.6,  Up: Miscellaneous
  870.  
  871. Telnet from shell filters too much
  872. ==================================
  873.  
  874.    I'm using the Emacs `M-x shell' function, and I would like to invoke
  875. and use a telnet session within it.  Everything works fine except that
  876. now all `^M''s are filtered out by Emacs.  Fixes?
  877.  
  878.    Use `M-x rsh' or `M-x telnet' to open remote sessions rather than
  879. doing rsh or telnet within the local shell buffer.
  880.  
  881. 
  882. File: xemacs-faq.info,  Node: Q5.0.8,  Next: Q5.0.9,  Prev: Q5.0.7,  Up: Miscellaneous
  883.  
  884. Why does edt emulation not work?
  885. ================================
  886.  
  887.    We don't know, but you can use tpu-edt emulation instead, which works
  888. fine and is a little fancier than the standard edt emulation.  To do
  889. this, add the following line to your `.emacs':
  890.  
  891.      (tpu-edt)
  892.  
  893.    If you don't want it to replace `C-h' with an edt-style help menu
  894. add this as well:
  895.  
  896.      (global-set-key [(control h)] 'help-for-help)
  897.  
  898. 
  899. File: xemacs-faq.info,  Node: Q5.0.9,  Next: Q5.0.10,  Prev: Q5.0.8,  Up: Miscellaneous
  900.  
  901. How can I emulate VI and use it as my default mode?
  902. ===================================================
  903.  
  904.    Our recommended VI emulator is viper. To make viper-mode the default,
  905. add this to your `.emacs':
  906.  
  907.      (viper-mode)
  908.  
  909.    Michael Kifer <kifer@CS.SunySB.EDU> writes:
  910.  
  911.      This should be added as close to the top of `.emacs' as you can get
  912.      it, otherwise some minor modes may not get viper-ized.
  913.  
  914. 
  915. File: xemacs-faq.info,  Node: Q5.0.10,  Next: Q5.0.11,  Prev: Q5.0.9,  Up: Miscellaneous
  916.  
  917. [This question intentionally left blank]
  918. ========================================
  919.  
  920.    Obsolete question, left blank to avoid renumbering
  921.  
  922. 
  923. File: xemacs-faq.info,  Node: Q5.0.11,  Next: Q5.0.12,  Prev: Q5.0.10,  Up: Miscellaneous
  924.  
  925. Filladapt doesn't work in 19.15
  926. ===============================
  927.  
  928.    Filladapt 2.x is included in 19.15.  In it filladapt is now a minor
  929. mode and minor modes are traditionally off by default.  The following
  930. added to your `.emacs' will turn it on for all buffers:
  931.  
  932.      (setq-default filladapt-mode t)
  933.  
  934.    Use `turn-on-filladapt-mode' to turn Filladapt on in particular
  935. major modes, like this:
  936.  
  937.      (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
  938.  
  939. 
  940. File: xemacs-faq.info,  Node: Q5.0.12,  Next: Q5.0.13,  Prev: Q5.0.11,  Up: Miscellaneous
  941.  
  942. How do I disable gnuserv from opening a new frame?
  943. ==================================================
  944.  
  945.    If you set the `gnuserv-frame' variable to the frame that should be
  946. used to display buffers that are pulled up, a new frame will not be
  947. created. For example, you could put
  948.  
  949.      (setq gnuserv-frame (selected-frame))
  950.  
  951.    early on in your `.emacs', to ensure that the first frame created is
  952. the one used for your gnuserv buffers.
  953.  
  954.    Starting in 19.15, there is an option to set the gnuserv target to
  955. the current frame.  See `Options->"Other Window" Location->Make current
  956. frame gnuserv target'
  957.  
  958. 
  959. File: xemacs-faq.info,  Node: Q5.0.13,  Next: Q5.0.14,  Prev: Q5.0.12,  Up: Miscellaneous
  960.  
  961. How do I start gnuserv so that each subsequent XEmacs is a client?
  962. ==================================================================
  963.  
  964.    Put the following in your `.emacs' file to start the server:
  965.  
  966.      (gnuserv-start)
  967.  
  968.    Start your first XEmacs as usual.  After that, you can do:
  969.  
  970.      gnuclient randomfilename
  971.  
  972.    from the command line to get your existing XEmacs process to open a
  973. new frame and visit randomfilename in that window. When you're done
  974. editing randomfilename, hit `C-x #' to kill the buffer and get rid of
  975. the frame.
  976.  
  977. 
  978. File: xemacs-faq.info,  Node: Q5.0.14,  Next: Q5.0.15,  Prev: Q5.0.13,  Up: Miscellaneous
  979.  
  980. Strange things are happening in Shell Mode.
  981. ===========================================
  982.  
  983.    Sometimes (i.e. it's not repeatable, and I can't work out why it
  984. happens) when I'm typing into shell mode, I hit return and only a
  985. portion of the command is given to the shell, and a blank prompt is
  986. returned.  If I hit return again, the rest of the previous command is
  987. given to the shell.
  988.  
  989.    Martin Buchholz <Martin.Buchholz@sun.com> writes:
  990.  
  991.      There is a known problem with interaction between `csh' and the
  992.      `filec' option and XEmacs.  You should add the following to your
  993.      `.cshrc':
  994.  
  995.           if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
  996.  
  997. 
  998. File: xemacs-faq.info,  Node: Q5.0.15,  Next: Q5.0.16,  Prev: Q5.0.14,  Up: Miscellaneous
  999.  
  1000. Where do I get the latest CC Mode?
  1001. ==================================
  1002.  
  1003.    Barry A. Warsaw <bwarsaw@cnri.reston.va.us> writes:
  1004.  
  1005.      This can be had from <URL:http://www.python.org/ftp/emacs/>.
  1006.  
  1007. 
  1008. File: xemacs-faq.info,  Node: Q5.0.16,  Next: Q5.0.17,  Prev: Q5.0.15,  Up: Miscellaneous
  1009.  
  1010. I find auto-show-mode disconcerting.  How do I turn it off?
  1011. ===========================================================
  1012.  
  1013.    `auto-show-mode' controls whether or not a horizontal scrollbar
  1014. magically appears when a line is too long to be displayed.  This is
  1015. enabled by default.  To turn it off, put the following in your `.emacs':
  1016.  
  1017.      (setq auto-show-mode nil)
  1018.      (setq-default auto-show-mode nil)
  1019.  
  1020. 
  1021. File: xemacs-faq.info,  Node: Q5.0.17,  Next: Q5.0.18,  Prev: Q5.0.16,  Up: Miscellaneous
  1022.  
  1023. How can I get two instances of info?
  1024. ====================================
  1025.  
  1026.    You can't.  The info package does not provide for multiple info
  1027. buffers.
  1028.  
  1029. 
  1030. File: xemacs-faq.info,  Node: Q5.0.18,  Next: Q5.0.19,  Prev: Q5.0.17,  Up: Miscellaneous
  1031.  
  1032. I upgraded to XEmacs 19.14 and gnuserv stopped working.
  1033. =======================================================
  1034.  
  1035.    Mark Daku <daku@nortel.ca> writes:
  1036.  
  1037.      It turns out I was using an older version of gnuserv.  The
  1038.      installation didn't put the binary into the public bin directory.
  1039.      It put it in `lib/xemacs-19.14/hppa1.1-hp-hpux9.05/gnuserv'.
  1040.      Shouldn't it have been put in `bin/hppa1.1-hp-hpux9.0'?
  1041.  
  1042. 
  1043. File: xemacs-faq.info,  Node: Q5.0.19,  Next: Q5.1.1,  Prev: Q5.0.18,  Up: Miscellaneous
  1044.  
  1045. Is there something better than LaTeX mode?
  1046. ==========================================
  1047.  
  1048.    David Kastrup <dak@fsnif.neuroinformatik.ruhr-uni-bochum.de> writes:
  1049.  
  1050.      The standard TeX modes leave much to be desired, and are somewhat
  1051.      leniently maintained.  Serious TeX users use AUC TeX (*Note
  1052.      Q4.7.1::).
  1053.  
  1054. 
  1055. File: xemacs-faq.info,  Node: Q5.1.1,  Next: Q5.1.2,  Prev: Q5.0.19,  Up: Miscellaneous
  1056.  
  1057. What is the difference in key sequences between XEmacs and GNU Emacs?
  1058. =====================================================================
  1059.  
  1060.    Erik Naggum <erik@naggum.no> writes;
  1061.  
  1062.      Emacs has a legacy of keyboards that produced characters with
  1063.      modifier bits, and therefore map a variety of input systems into
  1064.      this scheme even today.  XEmacs is instead optimized for X events.
  1065.      This causes an incompatibility in the way key sequences are
  1066.      specified, but both Emacs and XEmacs will accept a key sequence as
  1067.      a vector of lists of modifiers that ends with a key, e.g., to bind
  1068.      `M-C-a', you would say `[(meta control a)]' in both Emacsen.
  1069.      XEmacs has an abbreviated form for a single key, just (meta
  1070.      control a).  Emacs has an abbreviated form for the Control and the
  1071.      Meta modifiers to string-characters (the ASCII characters), as in
  1072.      `\M-\C-a'.  XEmacs users need to be aware that the abbreviated
  1073.      form works only for one-character key sequences, while Emacs users
  1074.      need to be aware that the string-character is rather limited.
  1075.      Specifically, the string-character can accomodate only 256
  1076.      different values, 128 of which have the Meta modifier and 128 of
  1077.      which have not.  In each of these blocks, only 32 characters have
  1078.      the Control modifier.  Whereas `[(meta control A)]' differs from
  1079.      `[(meta control a)]' because the case differs, `\M-\C-a' and
  1080.      `\M-\C-A' do not.  Programmers are advised to use the full common
  1081.      form, both because it is more readable and less error-prone, and
  1082.      because it is supported by both Emacsen.
  1083.  
  1084.    Another (even safer) way to be sure of the key-sequences is to use
  1085. the `read-kbd-macro' function, which takes a string like `C-c <up>',
  1086. and converts it to the internal key representation of the Emacs you
  1087. use.  The function is available both on XEmacs and GNU Emacs.
  1088.  
  1089. 
  1090. File: xemacs-faq.info,  Node: Q5.1.2,  Next: Q5.1.3,  Prev: Q5.1.1,  Up: Miscellaneous
  1091.  
  1092. Can I generate "fake" keyboard events?
  1093. ======================================
  1094.  
  1095.    I wonder if there is an interactive function that can generate
  1096. "fake" keyboard events.  This way, I could simply map them inside
  1097. XEmacs.
  1098.  
  1099.    This seems to work:
  1100.  
  1101.      (defun cg--generate-char-event (ch)
  1102.        "Generate an event, as if ch has been typed"
  1103.        (dispatch-event (character-to-event ch)))
  1104.      
  1105.      ;;  Backspace and Delete stuff
  1106.      (global-set-key [backspace]
  1107.                      (lambda () (interactive) (cg--generate-char-event 127)))
  1108.      (global-set-key [unknown_keysym_0x4]
  1109.                      (lambda () (interactive) (cg--generate-char-event 4)))
  1110.  
  1111. 
  1112. File: xemacs-faq.info,  Node: Q5.1.3,  Next: Q5.1.4,  Prev: Q5.1.2,  Up: Miscellaneous
  1113.  
  1114. Could you explain `read-kbd-macro' in more detail?
  1115. ==================================================
  1116.  
  1117.    The `read-kbd-macro' function returns the internal Emacs
  1118. representation of a human-readable string (which is its argument).
  1119. Thus:
  1120.  
  1121.      (read-kbd-macro "C-c C-a")
  1122.           => [(control ?c) (control ?a)]
  1123.      
  1124.      (read-kbd-macro "C-c C-. <up>")
  1125.           => [(control ?c) (control ?.) up]
  1126.  
  1127.    In GNU Emacs the same forms will be evaluated to what GNU Emacs
  1128. understands internally--the sequences `"\C-x\C-c"' and `[3 67108910
  1129. up]', respectively.
  1130.  
  1131.    The exact "human-readable" syntax is defined in the docstring of
  1132. `edmacro-mode'.  I'll repeat it here, for completeness.
  1133.  
  1134.      Format of keyboard macros during editing:
  1135.  
  1136.      Text is divided into "words" separated by whitespace.  Except for
  1137.      the words described below, the characters of each word go directly
  1138.      as characters of the macro.  The whitespace that separates words is
  1139.      ignored.  Whitespace in the macro must be written explicitly, as in
  1140.      `foo SPC bar RET'.
  1141.  
  1142.         * The special words `RET', `SPC', `TAB', `DEL', `LFD', `ESC',
  1143.           and `NUL' represent special control characters.  The words
  1144.           must be written in uppercase.
  1145.  
  1146.         * A word in angle brackets, e.g., `<return>', `<down>', or
  1147.           `<f1>', represents a function key.  (Note that in the standard
  1148.           configuration, the function key `<return>' and the control key
  1149.           `RET' are synonymous.)  You can use angle brackets on the
  1150.           words `RET', `SPC', etc., but they are not required there.
  1151.  
  1152.         * Keys can be written by their ASCII code, using a backslash
  1153.           followed by up to six octal digits.  This is the only way to
  1154.           represent keys with codes above \377.
  1155.  
  1156.         * One or more prefixes `M-' (meta), `C-' (control), `S-'
  1157.           (shift), `A-' (alt), `H-' (hyper), and `s-' (super) may
  1158.           precede a character or key notation.  For function keys, the
  1159.           prefixes may go inside or outside of the brackets: `C-<down>'
  1160.           == `<C-down>'.  The prefixes may be written in any order:
  1161.           `M-C-x' == `C-M-x'.
  1162.  
  1163.           Prefixes are not allowed on multi-key words, e.g., `C-abc',
  1164.           except that the Meta prefix is allowed on a sequence of
  1165.           digits and optional minus sign: `M--123' == `M-- M-1 M-2 M-3'.
  1166.  
  1167.         * The `^' notation for control characters also works: `^M' ==
  1168.           `C-m'.
  1169.  
  1170.         * Double angle brackets enclose command names: `<<next-line>>'
  1171.           is shorthand for `M-x next-line RET'.
  1172.  
  1173.         * Finally, `REM' or `;;' causes the rest of the line to be
  1174.           ignored as a comment.
  1175.  
  1176.      Any word may be prefixed by a multiplier in the form of a decimal
  1177.      number and `*': `3*<right>' == `<right> <right> <right>', and
  1178.      `10*foo' == `foofoofoofoofoofoofoofoofoofoo'.
  1179.  
  1180.      Multiple text keys can normally be strung together to form a word,
  1181.      but you may need to add whitespace if the word would look like one
  1182.      of the above notations: `; ; ;' is a keyboard macro with three
  1183.      semicolons, but `;;;' is a comment.  Likewise, `\ 1 2 3' is four
  1184.      keys but `\123' is a single key written in octal, and `< right >'
  1185.      is seven keys but `<right>' is a single function key.  When in
  1186.      doubt, use whitespace.
  1187.  
  1188. 
  1189. File: xemacs-faq.info,  Node: Q5.1.4,  Next: Q5.1.5,  Prev: Q5.1.3,  Up: Miscellaneous
  1190.  
  1191. What is the performance hit of `let'?
  1192. =====================================
  1193.  
  1194.    In most cases, not noticable.  Besides, there's no avoiding
  1195. `let'--you have to bind your local variables, after all.  Some pose a
  1196. question whether to nest `let's, or use one `let' per function.  I
  1197. think because of clarity and maintenance (and possible future
  1198. implementation), `let'-s should be used (nested) in a way to provide
  1199. the clearest code.
  1200.  
  1201. 
  1202. File: xemacs-faq.info,  Node: Q5.1.5,  Next: Q5.1.6,  Prev: Q5.1.4,  Up: Miscellaneous
  1203.  
  1204. What is the recommended use of `setq'?
  1205. ======================================
  1206.  
  1207.    * Global variables
  1208.  
  1209.      You will typically `defvar' your global variable to a default
  1210.      value, and use `setq' to set it later.
  1211.  
  1212.      It is never a good practice to `setq' user variables (like
  1213.      `case-fold-search', etc.), as it ignores the user's choice
  1214.      unconditionally.  Note that `defvar' doesn't change the value of a
  1215.      variable if it was bound previously.  If you wish to change a
  1216.      user-variable temporarily, use `let':
  1217.  
  1218.           (let ((case-fold-search nil))
  1219.             ...       ; code with searches that must be case-sensitive
  1220.             ...)
  1221.  
  1222.      You will notice the user-variables by their docstrings beginning
  1223.      with an asterisk (a convention).
  1224.  
  1225.    * Local variables
  1226.  
  1227.      Bind them with `let', which will unbind them (or restore their
  1228.      previous value, if they were bound) after exiting from the `let'
  1229.      form.  Change the value of local variables with `setq' or whatever
  1230.      you like (e.g. `incf', `setf' and such).  The `let' form can even
  1231.      return one of its local variables.
  1232.  
  1233.      Typical usage:
  1234.  
  1235.           ;; iterate through the elements of the list returned by
  1236.           ;; `hairy-function-that-returns-list'
  1237.           (let ((l (hairy-function-that-returns-list)))
  1238.             (while l
  1239.               ... do something with (car l) ...
  1240.               (setq l (cdr l))))
  1241.  
  1242.      Another typical usage includes building a value simply to work
  1243.      with it.
  1244.  
  1245.           ;; Build the mode keymap out of the key-translation-alist
  1246.           (let ((inbox (file-truename (expand-file-name box)))
  1247.                 (i 0))
  1248.             ... code dealing with inbox ...
  1249.             inbox)
  1250.  
  1251.      This piece of code uses the local variable `inbox', which becomes
  1252.      unbound (or regains old value) after exiting the form.  The form
  1253.      also returns the value of `inbox', which can be reused, for
  1254.      instance:
  1255.  
  1256.           (setq foo-processed-inbox
  1257.                 (let .....))
  1258.  
  1259. 
  1260. File: xemacs-faq.info,  Node: Q5.1.6,  Next: Q5.1.7,  Prev: Q5.1.5,  Up: Miscellaneous
  1261.  
  1262. What is the typical misuse of `setq' ?
  1263. ======================================
  1264.  
  1265.    A typical misuse is probably `setq'ing a variable that was meant to
  1266. be local.  Such a variable will remain bound forever, never to be
  1267. garbage-collected.  For example, the code doing:
  1268.  
  1269.      (defun my-function (whatever)
  1270.        (setq a nil)
  1271.        ... build a large list ...
  1272.        ... and exit ...)
  1273.  
  1274.    does a bad thing, as `a' will keep consuming memory, never to be
  1275. unbound.  The correct thing is to do it like this:
  1276.  
  1277.      (defun my-function (whatever)
  1278.        (let (a)             ; default initialization is to nil
  1279.          ... build a large list ...
  1280.          ... and exit, unbinding `a' in the process  ...)
  1281.  
  1282.    Not only is this prettier syntactically, but it makes it possible for
  1283. Emacs to garbage-collect the objects which `a' used to reference.
  1284.  
  1285.    Note that even global variables should not be `setq'ed without
  1286. `defvar'ing them first, because the byte-compiler issues warnings.  The
  1287. reason for the warning is the following:
  1288.  
  1289.      (defun flurgoze nil)          ; ok, global internal variable
  1290.      ...
  1291.      
  1292.      (setq flurghoze t)      ; ops!  a typo, but semantically correct.
  1293.                              ; however, the byte-compiler warns.
  1294.      
  1295.      While compiling toplevel forms:
  1296.        ** assignment to free variable flurghoze
  1297.  
  1298.